import { ResouceConst } from "../../../../component/gconst/ResouceConst";
import { ImagesConst } from "../../../resource/ImagesConst";
import { GTextFormat } from "../../../../common/GTextFormat";
import { ScaleBitmap } from "../../../../../com/mui/display/ScaleBitmap";
//class BgLabelToolTip
    
    export  class BgLabelToolTip /* flash.display.Sprite */
    {
        constructor(arg1: string="")
        {
            
            this._toolTipStr = arg1;
            this.init();
            return;
        }

        public set data(arg1: string)
        {
            this._toolTipStr = arg1;
            this.label.htmlText = "<textFormat leading=\'5\'>" + this._toolTipStr + "</textFormat>";
            this._bg.setSize(this.label.width + 10, this.label.height + 10);
            return;
        }

        /* internal  */init(): void
        {
            this._bg = ResouceConst.getScaleBitmap(ImagesConst.ToolTipBg);
            this.addChild(this._bg);
            this.label = new Object /* flash.text.TextField */();
            this.label.x = 5;
            this.label.y = 5;
            this.label.defaultTextFormat = new GTextFormat("", null, null, null, null, null, null, null, null, null, null, null, null);
            this.label.autoSize = flash.text.TextFieldAutoSize.LEFT;
            this.label.multiline = true;
            this.addChild(this.label);
            return;
        }

        public dispose(): void
        {
            while (this.numChildren) 
            {
                removeChildAt(0);
            }
            return;
        }

        protected /* var */_bg: ScaleBitmap;

        /* internal */ /* var */label: Object /* flash.text.TextField */;

        /* internal */ /* var */_toolTipStr: string;
    }
